<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ page import="db.DbClass" %>
<%@ page import="java.sql.*" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <script src='http://codepen.io/assets/libs/fullpage/jquery.js'></script>
<script src="js/index.js"></script>
<script src="/gg_bd_ad_720x90.js" type="text/javascript"></script>
<script src="/follow.js" type="text/javascript"></script>
<head>
<base href="<%=request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath()+"/" %>"/>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0"> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
 <meta name="viewport" content="width=device-width, initial-scale=1">
	<!-- Iconos -->
	<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">

    <link rel="stylesheet" href="css/style.css" media="screen" type="text/css" />
    <style type="text/css">
    body,td,th {
	font-family: "Open Sans", Arial, Helvetica, Sans-serif, Verdana, Tahoma;
	color: #5A7EB4;
}
    </style>
  </head>
  <body>
  <div id="index" ></div>
  <div class="b1"><strong>回复查看</strong></div>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    <%
     
      String name,subject,replycoment,time;
      subject=(String)request.getParameter("subject");
      Connection conn=new DbClass().getConn();
      Statement smt=conn.createStatement();
      String sql="select * from replytable where subject=?";
      PreparedStatement pst=conn.prepareStatement(sql);
      pst.setString(1,subject);
      ResultSet rs;
      rs=pst.executeQuery();
      out.print("<center>"); 
      out.print("<table border=1>");
      out.print("<tr>");
      
      out.print("<td bgcolor=yellow>回复人姓名</td>");
      out.print("<td bgcolor=yellow>主题</td>");
      out.print("<td bgcolor=yellow>回复内容</td>");
      out.print("<td bgcolor=yellow>回复时间</td>");  
      out.print("</tr>");
      while(rs.next()) 
    { 
   
    name=rs.getString(2); 
    subject=rs.getString(3); 
    replycoment=rs.getString(4);  
    time=rs.getString(5); 
//out.print("<center>"); 
//out.print("<table border=1>"); 
out.print("<tr>");

out.print("<td>"+name+"</td>"); 
out.print("<td>"+subject+"</td>"); 
out.print("<td>"+replycoment+"</td>"); 
out.print("<td>"+time+"</td>");
out.print("</tr>");
//out.print("</table><p>"); 
} 

out.print("</table><p>"); 
out.print("<a href='showall.jsp'>返回查看留言页面</a>");
 %>
  </body>
</html>
